@extends('layouts.app')
@section('content')
<!-- start: Content -->
<div class="row-fluid">		
	<div class="box span12">
		<div class="box-header" data-original-title="">
			<h2><span class="break"></span>账号管理</h2>
		</div>
		<div class="box-content">
			<table class="table table-striped" >
				<thead>
					<tr>
				  		<th style='width:10%;'>
				  			<!-- Button trigger modal -->
							<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
								 添加
							</button>
				  			<button type="submit" class="btn btn-danger" >删除</button>
				  		</th>
				  	</tr>
				  </thead>
			</table>
			<table class="table table-striped">
			<thead>
			  	<tr>
					<th style='width:1%;'><input type="checkbox" name='id[]' id="inlineCheckbox3" value="option3"></th>
			  		<th style='width:4%;'>序号</th>
			  		<th style='width:10%;'>账户号</th>
			  		<th style='width:10%;'>密码</th>
			  		<th>操作平台</th>
			  	</tr>
			</thead>   
			<tbody>
				@foreach($user as $uv)
				<form action="" method='POST'>
					{{ csrf_field() }}
					{{ method_field('PUT') }}
					<tr>
						<td><input type="checkbox" name='uid[]' id="inlineCheckbox3" value="{{ $uv->id }}"></td>
						<td style='text-align: center;'>{{ $uv->id }}</td>
						<td>{{ $uv->name }}</td>
						<td>{{ $uv->password }}</td>
						<td id='{{ $uv->id }}1' class="center" style='display: ;'>
							@if($uv->vip == 2)
								<span>后台操作系统</span>
							@endif
						</td>
					</tr>
				</form>
				@endforeach
			  </tbody>
		  </table>           
		</div>
	</div><!--/span-->

</div><!--/row-->
<!-- end: Content -->
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">后台操作系统新增账户</h4>
      </div>
 <form action="{{ URL('user/add') }}" method="POST">
      		{{ csrf_field() }}     
      <div class="modal-body">
      		
	          	<div class="col-md-6">
	                <label for="name" class="col-md-4 control-label">账户名</label>
	                <input id="name" type="text" class="form-control" name="name" required autofocus>
	                <br>
	                <span style='color:red;font-size: 12px;'>&nbsp;&nbsp;注：账户号只允许英文字母和数字，最多16个字符</span>
	            </div>
	            <div class="col-md-6">
	               	<label for="password" class="col-md-4 control-label">密码&nbsp;&nbsp;&nbsp;</label> 
	                <input id="password" type="password" class="form-control" name="password" required>
	                <br>
	                <span style='color:red;font-size: 12px;'>&nbsp;&nbsp;注：密码只允许英文字母和数字，最多16个字符</span>
	            </div>
            
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="submit" class="btn btn-primary">确认</button>
      </div>
  </form>
    </div>
  </div>
</div>
@stop
